import ch.qos.logback.classic.encoder.PatternLayoutEncoder
import ch.qos.logback.core.ConsoleAppender
import com.tc.log.MyLogbackAppender

import static ch.qos.logback.classic.Level.WARN
import static ch.qos.logback.classic.Level.INFO

def appenderList = []

appender("MYCONSOLE", MyLogbackAppender) {
	encoder(PatternLayoutEncoder) {
		pattern = "%d{yyyy/MM/dd-HH:mm:ss} %-5level [%thread] %class{5}:%line>>%msg%n"
	}
}

appender("CONSOLE", ConsoleAppender) {
	encoder(PatternLayoutEncoder) {pattern = "[%d{yyyy-MM-dd HH:mm:ss.SSS}] [my_mdc=%X{my_mdc}] [%level] [%thread] [%logger{50}] >>> %msg%n" }
}
//appenderList.add("MYCONSOLE")
appenderList.add("CONSOLE")
root(INFO, appenderList)
//logger("com.tc", INFO)